

<template>
  <div @click="toLogin">to login</div>
  <div @click="sendMessage">send message</div>
  <div @click="getMessage">get message</div>
</template>
<script setup>
// import 
import router from '@/router'
const toLogin = () => {
  router.push('/login')
}
const sendMessage = () => {
  eventBus.send('save-file',{
    name:'ggg',
    age:18
  })
}
const getMessage = async () => {
  const data = await eventBus.get('get-file')
  console.log(data)
}
</script>
